﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年1月8日
//类描述：实体类 BdReviews (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年1月8日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.Rights.Model
{
    /// <summary>
    /// 实体类 BdReviews (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "BdReviews", PrimaryKey = "GID", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class BdReviewsInfo : BaseModel
    {
        public BdReviewsInfo()
        {            
            PrimaryKey = "GID"; 
			Fields.Add("GID");//GID
			Fields.Add("CustomerName");//客户名称
			Fields.Add("Area");//客户地区
			Fields.Add("ReviewDate");//评论时间
			Fields.Add("Content");//评论内容
			Fields.Add("Star");//星级
			Fields.Add("HostName");//网站
			Fields.Add("Reply");//回复内容
			Fields.Add("ReplyBy");//回复者
			Fields.Add("ReplyDate");//回复日期
			Fields.Add("IsPublish");//是否发布
			Fields.Add("IsAuto");//是否自动新增
			Fields.Add("IP");//客户IP
			
			
			CanNotNullFields.Add("GID");//GID不能为空!				
			this.OnCreated();			
			this.OnModelCreated();
        }
		public BdReviewsInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
        }
        #endregion 
		
		#region 成员变量
				
		private Guid _GID;//GID
		private string _CustomerName;//客户名称
		private string _Area;//客户地区
		private DateTime? _ReviewDate;//评论时间
		private string _Content;//评论内容
		private string _Star;//星级
		private string _HostName;//网站
		private string _Reply;//回复内容
		private string _ReplyBy;//回复者
		private DateTime? _ReplyDate;//回复日期
		private bool? _IsPublish;//是否发布
		private bool? _IsAuto;//是否自动新增
		private string _IP;//客户IP
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// GID
        /// </summary>       
		[ModelField(Description = "GID", Type = typeof(Guid), ErrorMessage = "GID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 16,  DbType = "uniqueidentifier", IsNeedRecordModify = true)]
        public virtual Guid GID
        {
            get
            {
                return this._GID;
            }
            set
            {
                if (_GID != value || (_GID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "GID", _GID, value, "uniqueidentifier", "GID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnGIDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._GID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnGIDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _GID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 客户名称
        /// </summary>       
		[ModelField(Description = "客户名称", Type = typeof(string), ErrorMessage = "客户名称信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string CustomerName
        {
            get
            {
                return this._CustomerName;
            }
            set
            {
                if (_CustomerName != value || (_CustomerName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "CustomerName", _CustomerName, value, "nvarchar", "客户名称");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnCustomerNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._CustomerName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnCustomerNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _CustomerName = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 客户地区
        /// </summary>       
		[ModelField(Description = "客户地区", Type = typeof(string), ErrorMessage = "客户地区信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 500,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string Area
        {
            get
            {
                return this._Area;
            }
            set
            {
                if (_Area != value || (_Area == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "Area", _Area, value, "nvarchar", "客户地区");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnAreaChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Area = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnAreaChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Area = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评论时间
        /// </summary>       
		[ModelField(Description = "评论时间", Type = typeof(DateTime?), ErrorMessage = "评论时间信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? ReviewDate
        {
            get
            {
                return this._ReviewDate;
            }
            set
            {
                if (_ReviewDate != value || (_ReviewDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "ReviewDate", _ReviewDate, value, "datetime", "评论时间");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnReviewDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ReviewDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnReviewDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _ReviewDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评论内容
        /// </summary>       
		[ModelField(Description = "评论内容", Type = typeof(string), ErrorMessage = "评论内容信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 600,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string Content
        {
            get
            {
                return this._Content;
            }
            set
            {
                if (_Content != value || (_Content == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "Content", _Content, value, "nvarchar", "评论内容");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnContentChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Content = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnContentChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Content = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 星级
        /// </summary>       
		[ModelField(Description = "星级", Type = typeof(string), ErrorMessage = "星级信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 10,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Star
        {
            get
            {
                return this._Star;
            }
            set
            {
                if (_Star != value || (_Star == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "Star", _Star, value, "varchar", "星级");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnStarChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Star = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnStarChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Star = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 网站
        /// </summary>       
		[ModelField(Description = "网站", Type = typeof(string), ErrorMessage = "网站信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1000,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string HostName
        {
            get
            {
                return this._HostName;
            }
            set
            {
                if (_HostName != value || (_HostName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "HostName", _HostName, value, "varchar", "网站");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnHostNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._HostName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnHostNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _HostName = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 回复内容
        /// </summary>       
		[ModelField(Description = "回复内容", Type = typeof(string), ErrorMessage = "回复内容信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 600,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string Reply
        {
            get
            {
                return this._Reply;
            }
            set
            {
                if (_Reply != value || (_Reply == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "Reply", _Reply, value, "nvarchar", "回复内容");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnReplyChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Reply = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnReplyChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Reply = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 回复者
        /// </summary>       
		[ModelField(Description = "回复者", Type = typeof(string), ErrorMessage = "回复者信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string ReplyBy
        {
            get
            {
                return this._ReplyBy;
            }
            set
            {
                if (_ReplyBy != value || (_ReplyBy == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "ReplyBy", _ReplyBy, value, "nvarchar", "回复者");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnReplyByChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ReplyBy = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnReplyByChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _ReplyBy = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 回复日期
        /// </summary>       
		[ModelField(Description = "回复日期", Type = typeof(DateTime?), ErrorMessage = "回复日期信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? ReplyDate
        {
            get
            {
                return this._ReplyDate;
            }
            set
            {
                if (_ReplyDate != value || (_ReplyDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "ReplyDate", _ReplyDate, value, "datetime", "回复日期");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnReplyDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ReplyDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnReplyDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _ReplyDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 是否发布
        /// </summary>       
		[ModelField(Description = "是否发布", Type = typeof(bool?), ErrorMessage = "是否发布信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsPublish
        {
            get
            {
                return this._IsPublish;
            }
            set
            {
                if (_IsPublish != value || (_IsPublish == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "IsPublish", _IsPublish, value, "bit", "是否发布");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsPublishChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsPublish = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsPublishChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsPublish = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 是否自动新增
        /// </summary>       
		[ModelField(Description = "是否自动新增", Type = typeof(bool?), ErrorMessage = "是否自动新增信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsAuto
        {
            get
            {
                return this._IsAuto;
            }
            set
            {
                if (_IsAuto != value || (_IsAuto == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "IsAuto", _IsAuto, value, "bit", "是否自动新增");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsAutoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsAuto = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsAutoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsAuto = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 客户IP
        /// </summary>       
		[ModelField(Description = "客户IP", Type = typeof(string), ErrorMessage = "客户IP信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string IP
        {
            get
            {
                return this._IP;
            }
            set
            {
                if (_IP != value || (_IP == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdReviews", "IP", _IP, value, "nvarchar", "客户IP");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIPChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IP = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIPChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IP = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnGIDChanging(ModifyInfo modifyInfo);//GIDGID改变之前发生
        partial void OnGIDChanged(ModifyInfo modifyInfo);//GIDGID改变之后发生
		partial void OnCustomerNameChanging(ModifyInfo modifyInfo);//客户名称CustomerName改变之前发生
        partial void OnCustomerNameChanged(ModifyInfo modifyInfo);//客户名称CustomerName改变之后发生
		partial void OnAreaChanging(ModifyInfo modifyInfo);//客户地区Area改变之前发生
        partial void OnAreaChanged(ModifyInfo modifyInfo);//客户地区Area改变之后发生
		partial void OnReviewDateChanging(ModifyInfo modifyInfo);//评论时间ReviewDate改变之前发生
        partial void OnReviewDateChanged(ModifyInfo modifyInfo);//评论时间ReviewDate改变之后发生
		partial void OnContentChanging(ModifyInfo modifyInfo);//评论内容Content改变之前发生
        partial void OnContentChanged(ModifyInfo modifyInfo);//评论内容Content改变之后发生
		partial void OnStarChanging(ModifyInfo modifyInfo);//星级Star改变之前发生
        partial void OnStarChanged(ModifyInfo modifyInfo);//星级Star改变之后发生
		partial void OnHostNameChanging(ModifyInfo modifyInfo);//网站HostName改变之前发生
        partial void OnHostNameChanged(ModifyInfo modifyInfo);//网站HostName改变之后发生
		partial void OnReplyChanging(ModifyInfo modifyInfo);//回复内容Reply改变之前发生
        partial void OnReplyChanged(ModifyInfo modifyInfo);//回复内容Reply改变之后发生
		partial void OnReplyByChanging(ModifyInfo modifyInfo);//回复者ReplyBy改变之前发生
        partial void OnReplyByChanged(ModifyInfo modifyInfo);//回复者ReplyBy改变之后发生
		partial void OnReplyDateChanging(ModifyInfo modifyInfo);//回复日期ReplyDate改变之前发生
        partial void OnReplyDateChanged(ModifyInfo modifyInfo);//回复日期ReplyDate改变之后发生
		partial void OnIsPublishChanging(ModifyInfo modifyInfo);//是否发布IsPublish改变之前发生
        partial void OnIsPublishChanged(ModifyInfo modifyInfo);//是否发布IsPublish改变之后发生
		partial void OnIsAutoChanging(ModifyInfo modifyInfo);//是否自动新增IsAuto改变之前发生
        partial void OnIsAutoChanged(ModifyInfo modifyInfo);//是否自动新增IsAuto改变之后发生
		partial void OnIPChanging(ModifyInfo modifyInfo);//客户IPIP改变之前发生
        partial void OnIPChanged(ModifyInfo modifyInfo);//客户IPIP改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("BdReviews", "GID", GID);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("BdReviews", "GID", GID);		
			ManageEditURI = ZModel.InitMEditURI("BdReviews", "GID", GID);	
		 	ManageDetailURI = ZModel.InitMDetailURI("BdReviews", "GID", GID);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}